<template>
  <el-form-item :label="labelRuleValue.title" :prop="propValue">
    <el-checkbox-group
      :value="value"
      :disabled="disabledValue"
      @change="handleValue"
    >
      <el-checkbox
        v-for="(item, index) in labelRuleValue.content"
        :key="index"
        :label="String(item.value)"
        >{{ item["title_" + $store.state.settings.langTail] }}</el-checkbox
      >
    </el-checkbox-group>
  </el-form-item>
</template>
<script>
export default {
  props: {
    value: {
      type: Array, //对应值
      default: function () {
        return [];
      },
    },
    propValue: {
      type: String,
      default: "",
    },
    labelRuleValue: {
      type: Object,
      default: function () {
        return {};
      },
    },
    disabledValue: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
    handleValue(val) {
      this.$emit("update:value", val);
    },
  },
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-checkbox__input{
  vertical-align: unset;
}
::v-deep .el-checkbox__input.is-disabled + span.el-checkbox__label {
  white-space: normal;
}
</style>
